﻿using System.Web.Optimization;

namespace Ecommerce
{
    public class BundleConfig
    {
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            #region JS

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                "~/Scripts/modernizr-*"));

            // Layout
            bundles.Add(new ScriptBundle("~/bundles/layout").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/respond.js",
                "~/Scripts/jquery.lazyload.min.js",
                "~/Scripts/layout.js"));

            // Admin/Roles
            bundles.Add(new ScriptBundle("~/bundles/admin-roles").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/admin.roles.js"));

            // Admin/Users
            bundles.Add(new ScriptBundle("~/bundles/admin-users").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/admin.users.js"));

            // Admin/EditUser
            bundles.Add(new ScriptBundle("~/bundles/admin-edit-user").Include(
                "~/Scripts/bootstrap-datetimepicker.min.js",
                "~/Scripts/admin.edit.user.js"));

            // Admin/ProductCategories
            bundles.Add(new ScriptBundle("~/bundles/admin-product-categories").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/admin.product-categories.js"));

            // Admin/Brands
            bundles.Add(new ScriptBundle("~/bundles/admin-brands").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/admin.brands.js"));

            // Admin/PageGroups
            bundles.Add(new ScriptBundle("~/bundles/admin-page-groups").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/admin.page-groups.js"));

            // Admin/Pages
            bundles.Add(new ScriptBundle("~/bundles/admin-pages").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/admin.pages.js"));

            // Admin/EditPage
            bundles.Add(new ScriptBundle("~/bundles/admin-edit-page").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/ckeditor/ckeditor.js",
                "~/Scripts/admin.edit.page.js"));

            // Admin/PageGallery
            bundles.Add(new ScriptBundle("~/bundles/admin-page-gallery").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/bootstrap.file-input.js",
                "~/Scripts/messenger.min.js",
                "~/Scripts/jquery.lazyload.min.js",
                "~/Scripts/admin.page-gallery.js"));

            // Admin/EditPageImage
            bundles.Add(new ScriptBundle("~/bundles/admin-edit-page-image").Include(
                "~/Scripts/admin.edit.page-image.js"));

            // Admin/Specifications
            bundles.Add(new ScriptBundle("~/bundles/admin-specifications").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/jquery.sortable.min.js",
                "~/Scripts/admin.specifications.js"));

            // Admin/Products
            bundles.Add(new ScriptBundle("~/bundles/admin-products").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/admin.products.js"));

            // Admin/EditProduct
            bundles.Add(new ScriptBundle("~/bundles/admin-edit-product").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/select2.js",
                "~/Scripts/bootstrap.file-input.js",
                "~/ckeditor/ckeditor.js",
                "~/Scripts/admin.edit.product.js"));

            // Admin/EditProductSpecifications
            bundles.Add(new ScriptBundle("~/bundles/admin-edit-product-specifications").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/select2.js",
                "~/Scripts/messenger.min.js",
                "~/Scripts/admin.edit.product-specifications.js"));

            // Admin/ProductGallery
            bundles.Add(new ScriptBundle("~/bundles/admin-product-gallery").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/bootstrap.file-input.js",
                "~/Scripts/messenger.min.js",
                "~/Scripts/jquery.lazyload.min.js",
                "~/Scripts/admin.product-gallery.js"));

            // Admin/EditProductImage
            bundles.Add(new ScriptBundle("~/bundles/admin-edit-product-image").Include(
                "~/Scripts/admin.edit.product-image.js"));

            // Admin/Settings
            bundles.Add(new ScriptBundle("~/bundles/admin-settings").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",                
                "~/Scripts/admin.settings.js"));

            // Home/Page (Contact)
            bundles.Add(new ScriptBundle("~/bundles/contact").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.unobtrusive-ajax*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/jquery.lazyload.min.js",
                "~/Scripts/layout.js"));

            // Home
            bundles.Add(new ScriptBundle("~/bundles/home").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.lazyload.min.js",
                "~/Scripts/fotorama.js",
                "~/Scripts/layout.js"));

            // Product
            bundles.Add(new ScriptBundle("~/bundles/product").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Scripts/respond.js",
                "~/Content/material/js/ripples.min.js",
                "~/Content/material/js/material.min.js",
                "~/Scripts/jquery.lazyload.min.js",
                "~/Scripts/fotorama.js",
                "~/Scripts/layout.js",
                "~/Scripts/product.js"));

            #endregion

            #region CSS
            bundles.Add(new StyleBundle("~/Content/css").Include(
                "~/Content/bootstrap.css",
                "~/Content/material/css/roboto.css",
                "~/Content/material/css/material.min.css",
                "~/Content/material/css/ripples.min.css",
                "~/Content/site.css"));

            // Home
            bundles.Add(new StyleBundle("~/Content/home").Include(
                "~/Content/bootstrap.css",
                "~/Content/material/css/roboto.css",
                "~/Content/material/css/material.min.css",
                "~/Content/material/css/ripples.min.css",
                "~/Content/fotorama.css",
                "~/Content/site.css"));

            // Product
            bundles.Add(new StyleBundle("~/Content/product").Include(
                "~/Content/bootstrap.css",
                "~/Content/material/css/roboto.css",
                "~/Content/material/css/material.min.css",
                "~/Content/material/css/ripples.min.css",
                "~/Content/fotorama.css",
                "~/Content/site.css",
                "~/Content/product.css"));

            // Admin
            bundles.Add(new StyleBundle("~/Content/admin-css").Include(
                "~/Content/bootstrap.css",
                "~/Content/material/css/roboto.css",
                "~/Content/material/css/material.min.css",
                "~/Content/material/css/ripples.min.css",
                "~/Content/messenger.css",
                "~/Content/messenger-theme-block.css",
                "~/Content/admin.css"));

            // Admin/Users
            bundles.Add(new StyleBundle("~/Content/admin-edituser").Include(
                "~/Content/bootstrap-datetimepicker.css"));

            // Admin/EditProduct
            bundles.Add(new StyleBundle("~/Content/admin-edit-product").Include(
                "~/Content/select2.css"));

            // Admin/EditProductSpecifications
            bundles.Add(new StyleBundle("~/Content/admin-edit-product-specifications").Include(
                "~/Content/select2.css"));
            #endregion
        }
    }
}
